<%@ include file="/common/taglibs.jsp"%>

<title><fmt:message key="departmentList.title"/></title>
<content tag="heading"><fmt:message key="departmentList.heading"/></content>
<meta name="menu" content="DepartmentMenu"/>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/editDepartment.html"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" onclick="location.href='<html:rewrite forward="mainMenu"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false"/>

<display:table name="departmentList" cellspacing="0" cellpadding="0"
    id="departmentList" pagesize="25" class="table departmentList"
    export="true" requestURI="">

    <display:column property="deptId" sortable="true" headerClass="sortable"
        url="/editDepartment.html" paramId="deptId" paramProperty="deptId"
        titleKey="departmentForm.deptId"/>
    <display:column property="deptName" sortable="true" headerClass="sortable"
         titleKey="departmentForm.deptName"/>
    <display:column property="principal" sortable="true" headerClass="sortable"
         titleKey="departmentForm.principal"/>
    <display:column property="telNo" sortable="true" headerClass="sortable"
         titleKey="departmentForm.telNo"/>
    <display:setProperty name="paging.banner.item_name" value="department"/>
    <display:setProperty name="paging.banner.items_name" value="departments"/>
</display:table>

<c:out value="${buttons}" escapeXml="false"/>

<script type="text/javascript">
    highlightTableRows("departmentList");
</script>
